package labox.innovation.gameserver.rank;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javolution.util.FastList;
import labox.innovation.config.Config;
import labox.innovation.db.core.L2DatabaseFactory;
import labox.innovation.gameserver.model.FriendInfo;
import labox.innovation.gameserver.model.FuzeWorld;
import labox.innovation.gameserver.model.actor.instance.FuzePcInstance;

/**
 * ���а������
 * 
 * @author Frank
 * 
 */
public class RankManager {
	private static final Logger _log = LoggerFactory.getLogger(RankManager.class.getName());

	private static RankManager instance = new RankManager();

	/** ȫ���ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfLevel = new FastList<RankPlayerInfo>();

	/** ȫ����������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfSkill = new FastList<RankPlayerInfo>();

	/** ȫ���Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfWealth = new FastList<RankPlayerInfo>();

	/*------------------ȫ��ְҵ�ȼ����а�---------------*/

	/** ȫ�����ְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfKingKongLevel = new FastList<RankPlayerInfo>();

	/** ȫ����ְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfSworderLevel = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfMinerLevel = new FastList<RankPlayerInfo>();

	/** ȫ����ɲְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfDemonLevel = new FastList<RankPlayerInfo>();

	/** ȫ����ڤְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfNetherLevel = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ�ȼ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfBewitcherLevel = new FastList<RankPlayerInfo>();

	/*------------------ȫ��ְҵ�������а�---------------*/

	/** ȫ�����ְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfKingKongSkill = new FastList<RankPlayerInfo>();

	/** ȫ����ְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfSworderSkill = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfMinerSkill = new FastList<RankPlayerInfo>();

	/** ȫ����ɲְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfDemonSkill = new FastList<RankPlayerInfo>();

	/** ȫ����ڤְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfNetherSkill = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ��������ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfBewitcherSkill = new FastList<RankPlayerInfo>();

	/*------------------ȫ��ְҵ�Ƹ����а�---------------*/

	/** ȫ�����ְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfKingKongWealth = new FastList<RankPlayerInfo>();

	/** ȫ����ְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfSworderWealth = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfMinerWealth = new FastList<RankPlayerInfo>();

	/** ȫ����ɲְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfDemonWealth = new FastList<RankPlayerInfo>();

	/** ȫ����ڤְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfNetherWealth = new FastList<RankPlayerInfo>();

	/** ȫ������ְҵ�Ƹ�����ǰ10������б� */
	private FastList<RankPlayerInfo> topTenOfBewitcherWealth = new FastList<RankPlayerInfo>();

	private RankManager() {

	}

	/**
	 * ��ȡRankManagerΨһʵ��
	 * 
	 * @return
	 */
	public static RankManager getInstance() {
		return instance;
	}

	/**
	 * ��������������Ϣ�б?�÷�����ʱִ��һ�Ρ�
	 */
	public void buildRanks() {
//		long beginTime = System.currentTimeMillis();
		generateDatas();
		
//		System.out.println("ִ�д洢��̺�ʱΪ��" + (System.currentTimeMillis() - beginTime));
//		beginTime = System.currentTimeMillis();
		
		/* ȫ�����а�ǰ10�� */
		loadTopTenOfLevel(); // -- ����ȫ���ȼ�����ǰ10������б�
		loadTopTenOfSkill(); // -- ����ȫ����������ǰ10������б�
		loadTopTenOfWealth(); // -- ����ȫ���Ƹ�����ǰ10������б�

		/* ְҵ�ȼ�ȫ�����а�ǰ10�� */
		loadTopTenOfKingKongLevel(); // -- ����ȫ�����ְҵ��������ǰ10������б�
		loadTopTenOfSworderLevel(); // -- ����ȫ����ְҵ�ȼ�����ǰ10������б�
		loadTopTenOfMinerLevel(); // -- ����ȫ������ְҵ�ȼ�����ǰ10������б�
		loadTopTenOfDemonLevel(); // -- ����ȫ����ɲְҵ�ȼ�����ǰ10������б�
		loadTopTenOfNetherLevel(); // -- ����ȫ����ڤְҵ�ȼ�����ǰ10������б�
		loadTopTenOfBewitcherLevel(); // -- ����ȫ������ְҵ�ȼ�����ǰ10������б�

		/* ְҵ����ȫ�����а�ǰ10�� */
		LoadTopTenOfKingKongSkill(); // -- ����ȫ����ռ��ܲƸ�����ǰ10������б�
		LoadTopTenOfSworderSkill(); // -- ����ȫ�����ܲƸ�����ǰ10������б�
		LoadTopTenOfMinerSkill(); // -- ����ȫ�����׼��ܲƸ�����ǰ10������б�
		loadTopTenOfDemonSkill(); // -- ����ȫ����ɲ���ܲƸ�����ǰ10������б�
		loadTopTenOfNetherSkill(); // -- ����ȫ����ڤ���ܲƸ�����ǰ10������б�
		loadTopTenOfBewitcherSkill(); // -- ����ȫ�����꼼�ܲƸ�����ǰ10������б�

		/* ְҵ�Ƹ�ȫ�����а�ǰ10�� */
		loadTopTenOfKingKongWealth(); // -- ����ȫ�����ְҵ�Ƹ�����ǰ10������б�
		loadTopTenOfSworderWealth(); // -- ����ȫ����ְҵ�Ƹ�����ǰ10������б�
		loadTopTenOfMinerWealth(); // -- ����ȫ������ְҵ�Ƹ�����ǰ10������б�
		loadTopTenOfDemonWealth(); // -- ����ȫ����ɲְҵ�Ƹ�����ǰ10������б�
		loadTopTenOfNetherWealth(); // -- ����ȫ����ڤְҵ�Ƹ�����ǰ10������б�
		loadTopTenOfBewitcherWealth(); // -- ����ȫ������ְҵ�Ƹ�����ǰ10������б�
		
//		System.out.println("ִ�������̺�ʱΪ��" + (System.currentTimeMillis() - beginTime));
	}
	
	private boolean generateDatas() {
		boolean result = false;
		
		Connection con = null;
		PreparedStatement stmt = null;
		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("call proc_Build_All_Ranks()");
			stmt.executeUpdate();
			result = true;
		} catch (Exception e) {
			_log.error("ִ�����а�洢��̳���", Config.SERVER_ID, e);
		} finally {
			try {
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("ִ�����а�洢��̹ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
		
		return result;
	}

	/**
	 * ����ȫ���ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_rank_ten order by rank asc");
			rs = stmt.executeQuery();
			topTenOfLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ���ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ���ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����������ǰ10������б�
	 */
	private void loadTopTenOfSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_skill_ten order by rank asc");
			rs = stmt.executeQuery();
			topTenOfSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ���Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_wealth_ten order by rank asc");
			rs = stmt.executeQuery();
			topTenOfWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ���Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ���Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ�����ְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfKingKongLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_kingkong order by rank asc");
			rs = stmt.executeQuery();
			topTenOfKingKongLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfKingKongLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ�����ְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ�����ְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfSworderLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_sworder order by rank asc");
			rs = stmt.executeQuery();
			topTenOfSworderLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfSworderLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfMinerLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_miner order by rank asc");
			rs = stmt.executeQuery();
			topTenOfMinerLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfMinerLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ɲְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfDemonLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_demon order by rank asc");
			rs = stmt.executeQuery();
			topTenOfDemonLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfDemonLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ɲְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ɲְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ڤְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfNetherLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_nether order by rank asc");
			rs = stmt.executeQuery();
			topTenOfNetherLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfNetherLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ڤְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ڤְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ�ȼ�����ǰ10������б�
	 */
	private void loadTopTenOfBewitcherLevel() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_bewitcher order by rank asc");
			rs = stmt.executeQuery();
			topTenOfBewitcherLevel.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfBewitcherLevel.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ�ȼ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ�ȼ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ�����ְҵ��������ǰ10������б�
	 */
	private void LoadTopTenOfKingKongSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_kingkong_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfKingKongSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfKingKongSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ�����ְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ�����ְҵ��������ǰ10������б�ر�statement����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ְҵ��������ǰ10������б�
	 */
	private void LoadTopTenOfSworderSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_sworder_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfSworderSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfSworderSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ְҵ��������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ��������ǰ10������б�
	 */
	private void LoadTopTenOfMinerSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_miner_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfMinerSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfMinerSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ��������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ɲְҵ��������ǰ10������б�
	 */
	private void loadTopTenOfDemonSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_demon_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfDemonSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfDemonSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ɲְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ɲְҵ��������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ڤְҵ��������ǰ10������б�
	 */
	private void loadTopTenOfNetherSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_nether_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfNetherSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfNetherSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ڤְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ڤְҵ��������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ��������ǰ10������б�
	 */
	private void loadTopTenOfBewitcherSkill() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_bewitcher_skill order by rank asc");
			rs = stmt.executeQuery();
			topTenOfBewitcherSkill.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfBewitcherSkill.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ��������ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ��������ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ�����ְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfKingKongWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		topTenOfKingKongWealth.clear();

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_kingkong_wealth order by rank asc");
			rs = stmt.executeQuery();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfKingKongWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ�����ְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ�����ְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfSworderWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_sworder_wealth order by rank asc");
			rs = stmt.executeQuery();
			topTenOfSworderWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfSworderWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfMinerWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_miner_wealth order by rank asc");
			rs = stmt.executeQuery();
			topTenOfMinerWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfMinerWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ɲְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfDemonWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_demon_wealth order by rank asc");
			rs = stmt.executeQuery();
			topTenOfDemonWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfDemonWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ɲְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ɲְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ����ڤְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfNetherWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_nether_wealth order by rank asc");
			rs = stmt.executeQuery();
			topTenOfNetherWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfNetherWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ����ڤְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ����ڤְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ����ȫ������ְҵ�Ƹ�����ǰ10������б�
	 */
	private void loadTopTenOfBewitcherWealth() {
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;

		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_bewitcher_wealth order by rank asc");
			rs = stmt.executeQuery();
			topTenOfBewitcherWealth.clear();

			while (rs.next()) {
				RankPlayerInfo p = new RankPlayerInfo();
				p.setCharid(rs.getLong("charid"));
				p.setCharName(rs.getString("char_name"));
				p.setSex(rs.getByte("sex"));
				p.setClassid(rs.getByte("classid"));
				p.setLevel(rs.getInt("level"));
				p.setCreatetime(rs.getLong("createtime"));
				p.setRank(rs.getInt("rank"));
				topTenOfBewitcherWealth.add(p);
			}
		} catch (Exception e) {
			_log.error("����ȫ������ְҵ�Ƹ�����ǰ10������б����", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("����ȫ������ְҵ�Ƹ�����ǰ10������б�ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
	}

	/**
	 * ������ID��ȡ����ȫ���ĵȼ��������
	 * 
	 * @param id
	 * @return
	 */
	public RankPlayerInfo getLevelRankByPlayerID(long id) {
		RankPlayerInfo result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_rank where charid = ?");
			stmt.setLong(1, id);
			rs = stmt.executeQuery();

			if (rs.next()) {
				result = new RankPlayerInfo();
				result.setCharid(rs.getLong("charid"));
				result.setCharName(rs.getString("char_name"));
				result.setSex(rs.getByte("sex"));
				result.setClassid(rs.getByte("classid"));
				result.setLevel(rs.getInt("level"));
				result.setCreatetime(rs.getLong("createtime"));
				result.setRank(rs.getInt("rank"));
			}
		} catch (Exception e) {
			_log.error("������ID��ȡ����ȫ���ĵȼ������������", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("������ID��ȡ����ȫ���ĵȼ���������ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
		return result;
	}
	
	/**
	 * ������ID��ȡ����ȫ���ļ����������
	 * @param id
	 * @return
	 */
	public RankPlayerInfo getSkillRankByPlayerID(long id) {
		RankPlayerInfo result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_skill where charid = ?");
			stmt.setLong(1, id);
			rs = stmt.executeQuery();

			if (rs.next()) {
				result = new RankPlayerInfo();
				result.setCharid(rs.getLong("charid"));
				result.setCharName(rs.getString("char_name"));
				result.setSex(rs.getByte("sex"));
				result.setClassid(rs.getByte("classid"));
				result.setLevel(rs.getInt("level"));
				result.setCreatetime(rs.getLong("createtime"));
				result.setRank(rs.getInt("rank"));
			}
		} catch (Exception e) {
			_log.error("������ID��ȡ����ȫ���ļ��������������", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("������ID��ȡ����ȫ���ļ�����������ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
		return result;
	}
	
	/**
	 * ������ID��ȡ����ȫ���ĲƸ��������
	 * @param id
	 * @return
	 */
	public RankPlayerInfo getWealthRankByPlayerID(long id) {
		RankPlayerInfo result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		
		try {
			con = L2DatabaseFactory.getInstance().getConnection();
			stmt = con.prepareStatement("select * from rank_characters_wealth where charid = ?");
			stmt.setLong(1, id);
			rs = stmt.executeQuery();

			if (rs.next()) {
				result = new RankPlayerInfo();
				result.setCharid(rs.getLong("charid"));
				result.setCharName(rs.getString("char_name"));
				result.setSex(rs.getByte("sex"));
				result.setClassid(rs.getByte("classid"));
				result.setLevel(rs.getInt("level"));
				result.setCreatetime(rs.getLong("createtime"));
				result.setRank(rs.getInt("rank"));
			}
		} catch (Exception e) {
			_log.error("������ID��ȡ����ȫ���ĲƸ������������", Config.SERVER_ID, e);
		} finally {
			try {
				rs.close();
				stmt.close();
				con.close();
			} catch (Exception e) {
				_log.error("������ID��ȡ����ȫ���ĲƸ���������ر�statementʱ����", Config.SERVER_ID, e);
			}
		}
		return result;
	}

	/**
	 * ��ȡ���ѵȼ�����
	 * 
	 * @param id
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenLevelOfFriends(long id) {
		FastList<RankPlayerInfo> result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		String sql = "select * from rank_characters_rank where charid in (";
		String aWhere = "";
		FuzePcInstance activeChar = (FuzePcInstance) FuzeWorld.getInstance().findObject(id);
		FastList<FriendInfo> friends = activeChar.getFriendInstance().getFriendList();
		if (friends.size() <= 0)
			return null;

		for (FriendInfo info : friends) {
			aWhere = aWhere + ", " + info.getFriendId();
		}

		if (aWhere.length() > 0) {
			aWhere = aWhere.substring(1) + ")";
			sql = sql + aWhere + " order by rank asc limit 10";
			
			result = new FastList<RankPlayerInfo>();

			try {
				con = L2DatabaseFactory.getInstance().getConnection();
				
				stmt = con.prepareStatement(sql);
				rs = stmt.executeQuery();
				RankPlayerInfo p = new RankPlayerInfo();
				while (rs.next()) {
					p = new RankPlayerInfo();
					p.setCharid(rs.getLong("charid"));
					p.setCharName(rs.getString("char_name"));
					p.setSex(rs.getByte("sex"));
					p.setClassid(rs.getByte("classid"));
					p.setLevel(rs.getInt("level"));
					p.setCreatetime(rs.getLong("createtime"));
					p.setRank(rs.getInt("rank"));
					result.add(p);
				}
			} catch (Exception e) {
				_log.error("��ȡ���ѵȼ����г���", Config.SERVER_ID, e);
			} finally {
				try {
					rs.close();
					stmt.close();
					con.close();
				} catch (Exception e) {
					_log.error("��ȡ���ѵȼ����йر�statementʱ����", Config.SERVER_ID, e);
				}
			}

		} else
			return null;

		return result;
	}

	/**
	 * ��ȡ���Ѽ�������
	 * 
	 * @param id
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenSkillOfFriends(long id) {
		FastList<RankPlayerInfo> result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		String sql = "select * from rank_characters_skill where charid in (";
		String aWhere = "";
		FuzePcInstance activeChar = (FuzePcInstance) FuzeWorld.getInstance().findObject(id);
		FastList<FriendInfo> friends = activeChar.getFriendInstance().getFriendList();
		if (friends.size() <= 0)
			return null;

		for (FriendInfo info : friends) {
			aWhere = aWhere + ", " + info.getFriendId();
		}

		if (aWhere.length() > 0) {
			aWhere = aWhere.substring(1) + ")";
			sql = sql + aWhere + " order by rank asc limit 10";
			result = new FastList<RankPlayerInfo>();

			try {
				con = L2DatabaseFactory.getInstance().getConnection();
				
				stmt = con.prepareStatement(sql);
				rs = stmt.executeQuery();
				RankPlayerInfo p = new RankPlayerInfo();
				while (rs.next()) {
					p = new RankPlayerInfo();
					p.setCharid(rs.getLong("charid"));
					p.setCharName(rs.getString("char_name"));
					p.setSex(rs.getByte("sex"));
					p.setClassid(rs.getByte("classid"));
					p.setLevel(rs.getInt("level"));
					p.setCreatetime(rs.getLong("createtime"));
					p.setRank(rs.getInt("rank"));
					result.add(p);
				}
			} catch (Exception e) {
				_log.error("��ȡ���Ѽ������г���", Config.SERVER_ID, e);
			} finally {
				try {
					rs.close();
					stmt.close();
					con.close();
				} catch (Exception e) {
					_log.error("��ȡ���Ѽ������йر�statementʱ����", Config.SERVER_ID, e);
				}
			}

		} else
			return null;

		return result;
	}

	/**
	 * ��ȡ���ѲƸ�����
	 * 
	 * @param id
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenWealthOfFriends(long id) {
		FastList<RankPlayerInfo> result = null;
		Connection con = null;
		PreparedStatement stmt = null;
		ResultSet rs = null;
		String sql = "select * from rank_characters_wealth where charid in (";
		String aWhere = "";
		FuzePcInstance activeChar = (FuzePcInstance) FuzeWorld.getInstance().findObject(id);
		FastList<FriendInfo> friends = activeChar.getFriendInstance().getFriendList();
		if (friends.size() <= 0)
			return null;

		for (FriendInfo info : friends) {
			aWhere = aWhere + ", " + info.getFriendId();
		}

		if (aWhere.length() > 0) {
			aWhere = aWhere.substring(1) + ")";
			sql = sql + aWhere + " order by rank asc limit 10";

			result = new FastList<RankPlayerInfo>();

			try {
				con = L2DatabaseFactory.getInstance().getConnection();
				stmt = con.prepareStatement(sql);
				
				rs = stmt.executeQuery();
				RankPlayerInfo p = new RankPlayerInfo();
				while (rs.next()) {
					p = new RankPlayerInfo();
					p.setCharid(rs.getLong("charid"));
					p.setCharName(rs.getString("char_name"));
					p.setSex(rs.getByte("sex"));
					p.setClassid(rs.getByte("classid"));
					p.setLevel(rs.getInt("level"));
					p.setCreatetime(rs.getLong("createtime"));
					p.setRank(rs.getInt("rank"));
					result.add(p);
				}
			} catch (Exception e) {
				_log.error("��ȡ���ѲƸ����г���", Config.SERVER_ID, e);
			} finally {
				try {
					rs.close();
					stmt.close();
					con.close();
				} catch (Exception e) {
					_log.error("��ȡ���ѲƸ����йر�statementʱ����", Config.SERVER_ID, e);
				}
			}

		} else
			return null;

		return result;
	}

	/**
	 * ��ȡȫ���ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfLevel() {
		return this.topTenOfLevel;
	}

	/**
	 * ��ȡȫ����������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfSkill() {
		return this.topTenOfSkill;
	}

	/**
	 * ��ȡȫ���Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfWealth() {
		return this.topTenOfWealth;
	}

	/**
	 * ��ȡȫ�����ְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfKingKongLevel() {
		return this.topTenOfKingKongLevel;
	}

	/**
	 * ��ȡȫ����ְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfSworderLevel() {
		return this.topTenOfSworderLevel;
	}

	/**
	 * ��ȡȫ������ְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfMinerLevel() {
		return this.topTenOfMinerLevel;
	}

	/**
	 * ��ȡȫ����ɲְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfDemonLevel() {
		return this.topTenOfDemonLevel;
	}

	/**
	 * ��ȡȫ����ڤְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfNetherLevel() {
		return this.topTenOfNetherLevel;
	}

	/**
	 * ��ȡȫ������ְҵ�ȼ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfBewitcherLevel() {
		return this.topTenOfBewitcherLevel;
	}

	/**
	 * ��ȡȫ�����ְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfKingKongSkill() {
		return this.topTenOfKingKongSkill;
	}

	/**
	 * ��ȡȫ����ְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfSworderSkill() {
		return this.topTenOfSworderSkill;
	}

	/**
	 * ��ȡȫ������ְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfMinerSkill() {
		return this.topTenOfMinerSkill;
	}

	/**
	 * ��ȡȫ����ɲְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfDemonSkill() {
		return this.topTenOfDemonSkill;
	}

	/**
	 * ��ȡȫ����ڤְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfNetherSkill() {
		return this.topTenOfNetherSkill;
	}

	/**
	 * ��ȡȫ������ְҵ��������ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfBewitcherSkill() {
		return this.topTenOfBewitcherSkill;
	}

	/**
	 * ��ȡȫ�����ְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfKingKongWealth() {
		return this.topTenOfKingKongWealth;
	}

	/**
	 * ȫ����ְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfSworderWealth() {
		return this.topTenOfSworderWealth;
	}

	/**
	 * ��ȡȫ������ְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfMinerWealth() {
		return this.topTenOfMinerWealth;
	}

	/**
	 * ��ȡȫ����ɲְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfDemonWealth() {
		return this.topTenOfDemonWealth;
	}

	/**
	 * ��ȡȫ����ڤְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfNetherWealth() {
		return this.topTenOfNetherWealth;
	}

	/**
	 * ��ȡȫ������ְҵ�Ƹ�����ǰ10������б�
	 * 
	 * @return
	 */
	public FastList<RankPlayerInfo> getTopTenOfBewitcherWealth() {
		return this.topTenOfBewitcherWealth;
	}
}